var _events = require('events');
console.log(_events);
var _event = new _events.EventEmitter();
// var _EventEmitter = require('events').EventEmitter;
// var _event = new _EventEmitter();

_event.on('xx123',function(){
  console.log('event xx123');
  _event.emit('xx456');
  _event.emit('xx7','xx7Param');
});

_event.on('xx7',function(args1){
  console.log('event xx7 : ' + args1);
});
_event.on('xx7',function(args1){
  console.log('event xx72 : ' + args1);
});

_event.on('xx456',xx456);
function xx456(){
  console.log('event xx456');
}
// 事件需要先定义
_event.emit('xx123');


console.log(_event);